import { createWebHistory, createRouter } from "vue-router";
import Home from './views/Home.vue'
// import About from "./views/About.vue";

const routes = [
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        component: Home
    },
    {
        path: '/about',
        component: () => import('./views/About.vue'),
        children: [
            { path: 'tab1', component: () => import('@/views/Tab1.vue') },
            { path: 'tab2', component: () => import('@/views/Tab2.vue') }
        ]
    },
    {
        path: '/student/:studentNo',
        name: 'Student',
        component: () => import('@/views/Student.vue'),
        props: true
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes,
})

export default router